package com.tang.algorithm.ordinary;

/**
 * @author tlm
 * @version 1.0
 * @date 2020/6/13 20:41
 */
public class LeetCode70 {
    public int climbStairs(int n) {
        int a = 0, b = 0, res = 1;
        for (int i = 1; i < n; i++) {
            a = b;
            b = res;
            res = a + b;
        }
        return res;
    }
}